package com.benjaminwan.read.free.base.viewmodel

import com.airbnb.mvrx.BaseMvRxViewModel
import com.airbnb.mvrx.MvRxState

abstract class MvRxViewModel<S : MvRxState>(initialState: S) :
    BaseMvRxViewModel<S>(initialState, debugMode = false)

inline val <reified S : MvRxState>MvRxViewModel<S>.state: S
    get() = com.airbnb.mvrx.withState(this) {
        it
    }

inline fun <reified S : MvRxState> MvRxViewModel<S>.state(): S =
    com.airbnb.mvrx.withState(this) {
        it
    }
